/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Classes;

import java.util.ArrayList;
import java.util.Objects;

/**
 *  Représente une liste d'achats
 * @author Dany
 */
public class Achats {
        private ArrayList<Achat> _achats;
        /**
         * Constructors
         */
        public Achats(){
            this.setAchats(new ArrayList());
        }
        public Achats(ArrayList<Achat>listeAchat){
            this.setAchats(listeAchat);
        }      
        
        /**
         * Getters and setters
         * @return 
         */
        public ArrayList<Achat> getAchats(){
            return _achats;
        }
        
        public void setAchats(ArrayList achats){
            this._achats = achats;
        }

        /**
         * Equals
         * @param obj
         * @return true si equals
         */
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Achats other = (Achats) obj;
            if (!Objects.equals(this._achats, other._achats)) {
                return false;
            }
            return true;
        }
}
